package com.live.stamp.web.stamp.controller;

import com.live.stamp.base.constants.Constants;
import com.live.stamp.base.token.TokenAuth;
import com.live.stamp.base.validation.ParamHandlerManager;
import com.live.stamp.base.validation.ValidationEnum;
import com.live.stamp.global.commonenum.ListTypeEnum;
import com.live.stamp.global.commonenum.OrderTypeEnum;
import com.live.stamp.web.stamp.service.StampService;
import com.live.stamp.web.stamp.vo.TStampInfoVo;
import org.springframework.boot.container.core.common.BusinessException;
import org.springframework.boot.container.core.common.ServerResponse;
import org.springframework.boot.container.core.controller.BaseRestController;
import org.springframework.boot.container.core.log.ZKLogger;
import org.springframework.boot.container.core.log.ZKLoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 印记restController
 * @author cwd E-mail: wendong.cao@jsxfedu.com
 * @version 1
 * @date 2018/4/13 14:36
 */
@RestController
@RequestMapping("/stamp")
public class StampRestController extends BaseRestController {
    private static final ZKLogger logger = ZKLoggerFactory.getLogger(StampRestController.class);

    @Resource
    StampService stampService;

    /**
     * @api {post} /stamp/sendStamp 发送印迹
     * @apiSampleRequest /stamp/sendStamp
     * @apiName sendStamp
     * @apiGroup stamp
     * @apiDescription 发送印迹
     * @apiParam {String} title         标题
     * @apiParam {String} content       内容
     * @apiParam {double} longitude     经度
     * @apiParam {double} latitude      纬度
     * @apiParam {String} location      地址
     * @apiParam {String} pictures      图片地址，多个用“,”号拼接
     * @apiParam {String} label         标签：comm 默认、history 历史、plan 策划
     * @apiParam {String} roleType      查看权限类型：ALL 完全开放、PART 部分好友 、SELF 自己、FRID 好友
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
    {
    "code": 200,
    "msg": null,
    "data": ""
    }
     */
    @RequestMapping("/sendStamp")
    @TokenAuth
    public ServerResponse sendStamp(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller sendStamp, parm tStampInfoVo:{}", tStampInfoVo);
        ServerResponse response = new ServerResponse();

        try {
            ParamHandlerManager.getHeadHandle().handleMessage("content", tStampInfoVo.getContent(), ValidationEnum.BLANK)
                    .handleMessage("longitude", tStampInfoVo.getLatitude(), ValidationEnum.NUL)
                    .handleMessage("latitude", tStampInfoVo.getLatitude(), ValidationEnum.NUL);

            response.setCode(200);
            response.setData(stampService.sendStamp(tStampInfoVo));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("发送印迹失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/deleteStamp 删除印迹
     * @apiSampleRequest /stamp/deleteStamp
     * @apiName deleteStamp
     * @apiGroup stamp
     * @apiDescription 发送印迹
     * @apiParam {String} id         标题
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
    {
    "code": 200,
    "msg": null,
    "data": ""
    }
     */
    @RequestMapping("/deleteStamp")
    @TokenAuth
    public ServerResponse deleteStamp(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller deleteStamp, parm tStampInfoVo:{}", tStampInfoVo);
        ServerResponse response = new ServerResponse();

        try {
            ParamHandlerManager.getHeadHandle().handleMessage("id", tStampInfoVo.getId(), ValidationEnum.BLANK);

            response.setCode(200);
            response.setData(stampService.deleteStamp(tStampInfoVo.getId()));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("删除印迹失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/likeStamp 点赞印迹
     * @apiSampleRequest /stamp/likeStamp
     * @apiName likeStamp
     * @apiGroup stamp
     * @apiDescription 点赞印迹
     * @apiParam {String} id            印迹id
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
    {
    "code": 200,
    "msg": null,
    "data": ""
    }
     */
    @RequestMapping("/likeStamp")
    @TokenAuth
    public ServerResponse likeStamp(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller likeStamp, parm tStampInfoVo:{}", tStampInfoVo);
        ServerResponse response = new ServerResponse();
        try {
            ParamHandlerManager.getHeadHandle().handleMessage("id", tStampInfoVo.getId(), ValidationEnum.BLANK);

            response.setCode(200);
            response.setData(stampService.likeStamp(tStampInfoVo));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("点赞印迹失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/commentStamp 评论印迹
     * @apiSampleRequest /stamp/commentStamp
     * @apiName commentStamp
     * @apiGroup stamp
     * @apiDescription 发送印迹
     * @apiParam {String} id            印迹id
     * @apiParam {String} comment       评论内容
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
    {
    "code": 200,
    "msg": null,
    "data": ""
    }
     */
    @RequestMapping("/commentStamp")
    @TokenAuth
    public ServerResponse commentStamp(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller commentStamp, parm tStampInfoVo:{}", tStampInfoVo);
        ServerResponse response = new ServerResponse();
        try {
            ParamHandlerManager.getHeadHandle().handleMessage("id", tStampInfoVo.getId(), ValidationEnum.BLANK);

            response.setCode(200);
            response.setData(stampService.commentStamp(tStampInfoVo));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("点赞印迹失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/friendStampList 好友印迹列表
     * @apiSampleRequest /stamp/friendStampList
     * @apiName friendStampList
     * @apiGroup stamp
     * @apiDescription 发送印迹
     * @apiParam {double} longitude     所在位置经度
     * @apiParam {double} latitude      所在位置纬度
     * @apiParam {String} label         标签：mood 心情、travel 游记、notes 纪念、other 其他。 -- 参数为空则查询全部标签
     * @apiParam {String} friendId      好友id：如果此参数为空则查询所有好友印迹
     * @apiParam {String} orderType     排序类型，JL：距离，SJ:时间，CKS:查看数，DZS:点攒数，PLS:评论数
     * @apiParam {int} pageNo           页码
     * @apiParam {int} pageSize         每页条数
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
        {
            "code": 200,
            "msg": null,
            "data": {
                "start": 0,
                "pageSize": 20,                 --页码
                "totalCount": 1,                --一共多少条
                "totalPageCount": 1,            --当前页多少条
                "currentPageNo": 1,             --当前页码
                "hasNextPage": false,           --是否有下一页
                "hasPreviousPage": false,       --是否有前一页
                "startPage": true,              --是否为开始页
                "endPage": true                 --是否为最后一页
                "result": [
                    {
                    "id": "1bbea636162c354c2787DE506A5A8F38EC3B9040B521CD837F1",        --id
                    "title": "1",                                               --标题
                    "content": "1",                                             --内容
                    "longitude": 1,                                             --经度
                    "latitude": 1,                                              --纬度
                    "location": "1",                                            --位置
                    "label": "notes",                                           --标签
                    "lookCount": 0,                                             --查看数量
                    "likeCount": 1,                                             --点攒数
                    "commentCount": 5,                                          --评论数
                    "createTime": "2018-04-14T08:45:35.000+0000",               --创建时间
                    "state": "1",
                    "roleType": "notes",
                    "pictures": null,
                    "comment": null,
                    "userName": null,                                           --用户名
                    "photoUrl": "test",                                         --用户头像
                    "friendId": null,
                    "orderType": null,
                    "juli": null,
                    "listType": null,
                    "tuserId": "52dec91c162bdaf7fc17DE506A5A8F38EC3B9040B521CD837F1"    --用户id
                    }
            ]
            }
        }
     */
    @RequestMapping("/friendStampList")
    @TokenAuth
    public ServerResponse friendStampList(TStampInfoVo tStampInfoVo, Integer pageNo, Integer pageSize) {
        logger.info("enter controller commentStamp, parm tStampInfoVo:{}", tStampInfoVo);

        ServerResponse response = new ServerResponse();
        try {
            response.setCode(200);

            tStampInfoVo.setListType(ListTypeEnum.FRIEND.toString());
            response.setData(stampService.stampList(tStampInfoVo, pageNo, pageSize));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("获取好友印迹列表失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/attentionStampList 关注印迹列表
     * @apiSampleRequest /stamp/attentionStampList
     * @apiName attentionStampList
     * @apiGroup stamp
     * @apiDescription 发送印迹
     * @apiParam {double} longitude     所在位置经度
     * @apiParam {double} latitude      所在位置纬度
     * @apiParam {String} label         标签：mood 心情、travel 游记、notes 纪念、other 其他。 -- 参数为空则查询全部标签
     * @apiParam {String} friendId      关注id：如果此参数为空则查询所有好友印迹
     * @apiParam {String} orderType     排序类型，JL：距离，SJ:时间，CKS:查看数，DZS:点攒数，PLS:评论数
     * @apiParam {int} pageNo           页码
     * @apiParam {int} pageSize         每页条数
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
        {
            "code": 200,
            "msg": null,
            "data": {
            "start": 0,
            "pageSize": 20,                 --页码
            "totalCount": 1,                --一共多少条
            "totalPageCount": 1,            --当前页多少条
            "currentPageNo": 1,             --当前页码
            "hasNextPage": false,           --是否有下一页
            "hasPreviousPage": false,       --是否有前一页
            "startPage": true,              --是否为开始页
            "endPage": true                 --是否为最后一页
            "result": [
                {
                "id": "1bbea636162c354c2787DE506A5A8F38EC3B9040B521CD837F1",        --id
                "title": "1",                                               --标题
                "content": "1",                                             --内容
                "longitude": 1,                                             --经度
                "latitude": 1,                                              --纬度
                "location": "1",                                            --位置
                "label": "notes",                                           --标签
                "lookCount": 0,                                             --查看数量
                "likeCount": 1,                                             --点攒数
                "commentCount": 5,                                          --评论数
                "createTime": "2018-04-14T08:45:35.000+0000",               --创建时间
                "state": "1",
                "roleType": "notes",
                "pictures": null,
                "comment": null,
                "userName": null,                                           --用户名
                "photoUrl": "test",                                         --用户头像
                "friendId": null,
                "orderType": null,
                "juli": null,
                "listType": null,
                "tuserId": "52dec91c162bdaf7fc17DE506A5A8F38EC3B9040B521CD837F1"    --用户id
                }
            ]
            }
        }
     */
    @RequestMapping("/attentionStampList")
    @TokenAuth
    public ServerResponse attentionStampList(TStampInfoVo tStampInfoVo, Integer pageNo, Integer pageSize) {
        logger.info("enter controller attentionStampList, parm tStampInfoVo:{}", tStampInfoVo);

        ServerResponse response = new ServerResponse();
        try {
            response.setCode(200);

            tStampInfoVo.setListType(ListTypeEnum.ATTENT.toString());
            response.setData(stampService.stampList(tStampInfoVo, pageNo, pageSize));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("获取关注印迹列表失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/myselfStampList 我的印迹列表
     * @apiSampleRequest /stamp/myselfStampList
     * @apiName myselfStampList
     * @apiGroup stamp
     * @apiDescription 发送印迹
     * @apiParam {double} longitude     所在位置经度
     * @apiParam {double} latitude      所在位置纬度
     * @apiParam {String} label         标签：mood 心情、travel 游记、notes 纪念、other 其他。 -- 参数为空则查询全部标签
     * @apiParam {String} orderType     排序类型，JL：距离，SJ:时间，CKS:查看数，DZS:点攒数，PLS:评论数
     * @apiParam {int} pageNo           页码
     * @apiParam {int} pageSize         每页条数
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
        {
            "code": 200,
            "msg": null,
            "data": {
                "start": 0,
                "pageSize": 20,                 --页码
                "totalCount": 1,                --一共多少条
                "totalPageCount": 1,            --当前页多少条
                "currentPageNo": 1,             --当前页码
                "hasNextPage": false,           --是否有下一页
                "hasPreviousPage": false,       --是否有前一页
                "startPage": true,              --是否为开始页
                "endPage": true                 --是否为最后一页
                "result": [
                {
                    "id": "1bbea636162c354c2787DE506A5A8F38EC3B9040B521CD837F1",        --id
                    "title": "1",                                               --标题
                    "content": "1",                                             --内容
                    "longitude": 1,                                             --经度
                    "latitude": 1,                                              --纬度
                    "location": "1",                                            --位置
                    "label": "notes",                                           --标签
                    "lookCount": 0,                                             --查看数量
                    "likeCount": 1,                                             --点攒数
                    "commentCount": 5,                                          --评论数
                    "createTime": "2018-04-14T08:45:35.000+0000",               --创建时间
                    "state": "1",
                    "roleType": "notes",
                    "pictures": null,
                    "comment": null,
                    "userName": null,                                           --用户名
                    "photoUrl": "test",                                         --用户头像
                    "friendId": null,
                    "orderType": null,
                    "juli": null,
                    "listType": null,
                    "tuserId": "52dec91c162bdaf7fc17DE506A5A8F38EC3B9040B521CD837F1"    --用户id
                }
            ]
            }
        }
     */
    @RequestMapping("/myselfStampList")
    @TokenAuth
    public ServerResponse myselfStampList(TStampInfoVo tStampInfoVo, Integer pageNo, Integer pageSize) {
        logger.info("enter controller myselfStampList, parm tStampInfoVo:{}", tStampInfoVo);

        ServerResponse response = new ServerResponse();
        try {
            response.setCode(200);

            tStampInfoVo.setListType(ListTypeEnum.MYSELF.toString());
            response.setData(stampService.stampList(tStampInfoVo, pageNo, pageSize));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("获取我的印迹列表失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/discoverStampList 发现印迹
     * @apiSampleRequest /stamp/discoverStampList
     * @apiName discoverStampList
     * @apiGroup stamp
     * @apiDescription 发现印迹
     * @apiParam {double} longitude     所在位置经度
     * @apiParam {double} latitude      所在位置纬度
     * @apiParam {String} label         标签：mood 心情、travel 游记、notes 纪念、other 其他。 -- 参数为空则查询全部标签
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
        {
            "code": 200,
            "msg": null,
            "data": {
                "start": 0,
                "pageSize": 20,                 --页码
                "totalCount": 1,                --一共多少条
                "totalPageCount": 1,            --当前页多少条
                "currentPageNo": 1,             --当前页码
                "hasNextPage": false,           --是否有下一页
                "hasPreviousPage": false,       --是否有前一页
                "startPage": true,              --是否为开始页
                "endPage": true                 --是否为最后一页
            "result": [
                {
                    "id": "1bbea636162c354c2787DE506A5A8F38EC3B9040B521CD837F1",        --id
                    "title": "1",                                               --标题
                    "content": "1",                                             --内容
                    "longitude": 1,                                             --经度
                    "latitude": 1,                                              --纬度
                    "location": "1",                                            --位置
                    "label": "notes",                                           --标签
                    "lookCount": 0,                                             --查看数量
                    "likeCount": 1,                                             --点攒数
                    "commentCount": 5,                                          --评论数
                    "createTime": "2018-04-14T08:45:35.000+0000",               --创建时间
                    "state": "1",
                    "roleType": "notes",
                    "pictures": null,
                    "comment": null,
                    "userName": null,                                           --用户名
                    "photoUrl": "test",                                         --用户头像
                    "friendId": null,
                    "orderType": null,
                    "juli": null,
                    "listType": null,
                    "tuserId": "52dec91c162bdaf7fc17DE506A5A8F38EC3B9040B521CD837F1"    --用户id
                }
                ]
            }
        }
     */
    @RequestMapping("/discoverStampList")
    @TokenAuth
    public ServerResponse discoverStampList(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller discoverStampList, parm tStampInfoVo:{}", tStampInfoVo);

        ServerResponse response = new ServerResponse();
        try {
            response.setCode(200);

            tStampInfoVo.setListType(ListTypeEnum.DISCOVER.toString());
            tStampInfoVo.setOrderType(OrderTypeEnum.JL.toString());
            response.setData(stampService.stampList(tStampInfoVo, 1, Constants.DISCOVER_COUNT));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("获取我的印迹列表失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/stampInfo 印迹详情
     * @apiSampleRequest /stamp/stampInfo
     * @apiName stampInfo
     * @apiGroup stamp
     * @apiDescription 印迹详情
     * @apiParam {String} id         印迹id
     * @apiParam {String} token      token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
        {
            "code": 200,
            "msg": null,
            "data": {
                "stampInfo": {                  --印迹详细信息
                    "id": "1bbea636162c354c2787DE506A5A8F38EC3B9040B521CD837F1",        --印迹id
                    "title": "1",                                       --标题
                    "content": "1",                                     --内容
                    "longitude": 1,                                     --纬度
                    "latitude": 1,                                      --经度
                    "location": "1",                                    --位置
                    "label": "notes",                                   --标签：mood 心情、travel 游记、notes 纪念、other 其他
                    "lookCount": 2,                                     --查看数
                    "likeCount": 1,                                     --点赞数
                    "commentCount": 5,                                  --评论数
                    "createTime": "2018-04-14T08:45:35.000+0000",       --创建时间
                    "state": "1",
                    "roleType": "notes",
                    "pictures": null,                                   --图片,多图片以","号链接
                    "comment": null,
                    "userName": null,                                   --用户
                    "photoUrl": "test",                                 --头像
                    "friendId": null,
                    "orderType": null,
                    "juli": null,
                    "listType": null,
                    "tuserId": "52dec91c162bdaf7fc17DE506A5A8F38EC3B9040B521CD837F1"    --用户id
                    "isFriend": 1,                                          --是否为好友 1：是， 0：否
                    "isAttent": 1,                                          --是否已关注 1：是， 0：否
                    "isLike": 1                                             --是否已点赞 1：是， 0：否
                },
                "likeList": [               --点赞详情
                    {
                    "id": "1bbea636162c35770ad7DE506A5A8F38EC3B9040B521CD837F1",            --点赞id
                    "tInjiInfoId": "1bbea636162c354c2787DE506A5A8F38EC3B9040B521CD837F1",   --印迹id
                    "tUserId": "52dec91c162bdaf7fc17DE506A5A8F38EC3B9040B521CD837F1",       --用户id
                    "createTime": "2018-04-14T08:48:30.000+0000",                           --点赞时间
                    "photoUrl": "test",                                                     --头像
                    "username": "cwd"                                                       --用户名称
                    },
                    {
                    "id": "1bbea636162c35852467DE506A5A8F38EC3B9040B521CD837F1",
                    "tInjiInfoId": "1bbea636162c354c2787DE506A5A8F38EC3B9040B521CD837F1",
                    "tUserId": "52dec91c162bdaf7fc17DE506A5A8F38EC3B9040B521CD837F1",
                    "createTime": "2018-04-14T08:49:28.000+0000",
                    "photoUrl": "test",
                    "username": "cwd"
                    }
                ],
                "commentList": [        --评论详情
                    {
                    "id": "7fde42ee162c35c70447DE506A5A8F38EC3B9040B521CD837F1",            --评论id
                    "tInjiInfoId": "1bbea636162c354c2787DE506A5A8F38EC3B9040B521CD837F1",   --印迹id
                    "tUserId": "52dec91c162bdaf7fc17DE506A5A8F38EC3B9040B521CD837F1",       --用户id
                    "comment": "1111",                                                      --评论内容
                    "createTime": "2018-04-14T08:53:58.000+0000",                           --评论时间
                    "photoUrl": "test",                                                     --头像
                    "username": "cwd"                                                       --用户名
                    }
                ]
            }
        }
     */
    @RequestMapping("/stampInfo")
    @TokenAuth
    public ServerResponse stampInfo(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller stampInfo, parm tStampInfoVo:{}", tStampInfoVo);

        ServerResponse response = new ServerResponse();
        try {
            response.setCode(200);
            response.setData(stampService.stampInfo(tStampInfoVo));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("查看印迹信息失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/friendStampUpdateCount 好友更新数量
     * @apiSampleRequest /stamp/friendStampUpdateCount
     * @apiName friendStampUpdateCount
     * @apiGroup stamp
     * @apiDescription 好友更新数量
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
     * {
        "code": 200,
        "msg": null,
        "data": 1           --数量
        }
     */
    @RequestMapping("/friendStampUpdateCount")
    @TokenAuth
    public ServerResponse friendStampUpdateCount(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller myselfStampList, parm tStampInfoVo:{}", tStampInfoVo);

        ServerResponse response = new ServerResponse();
        try {
            response.setCode(200);

            tStampInfoVo.setListType(ListTypeEnum.FRIEND.toString());
            response.setData(stampService.stampListCount(tStampInfoVo));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("获取好友更新数量失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/attentStampUpdateCount 关注更新数量
     * @apiSampleRequest /stamp/attentStampUpdateCount
     * @apiName attentStampUpdateCount
     * @apiGroup stamp
     * @apiDescription 好友更新数量
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
     * {
        "code": 200,
        "msg": null,
        "data": 1           --数量
        }
     */
    @RequestMapping("/attentStampUpdateCount")
    @TokenAuth
    public ServerResponse attentStampUpdateCount(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller myselfStampList, parm tStampInfoVo:{}", tStampInfoVo);

        ServerResponse response = new ServerResponse();
        try {
            response.setCode(200);

            tStampInfoVo.setListType(ListTypeEnum.ATTENT.toString());
            response.setData(stampService.stampListCount(tStampInfoVo));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("获取好友更新数量失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/isStampUpdate 好友/关注 是否有更新
     * @apiSampleRequest /stamp/isStampUpdate
     * @apiName isStampUpdate
     * @apiGroup stamp
     * @apiDescription 好友更新数量
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
    {
    "code": 200,
    "msg": "",
    "data": {
        "friendStamp": "0",         --好友是否有更新：1：有，0：无
        "attenStamp": "0"           --关注是否有更新：1：有，0：无
    }
    }
     */
    @RequestMapping("/isStampUpdate")
    @TokenAuth
    public ServerResponse isStampUpdate(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller myselfStampList, parm tStampInfoVo:{}", tStampInfoVo);

        ServerResponse response = new ServerResponse();
        try {
            response.setCode(200);

            response.setData(stampService.isStampUpdate());
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("获取好友更新数量失败！");
        }

        return response;
    }

    /**
     * @api {post} /stamp/reportStamp 举报in迹
     * @apiSampleRequest /stamp/reportStamp
     * @apiName reportStamp
     * @apiGroup stamp
     * @apiDescription 举报in迹
     * @apiParam {String} id         标题
     * @apiParam {String} token         token
     * @apiParamExample {json} 参数示例:
     * {
     *
     * }
     * @apiSuccessExample {json} 返回示例:
     * HTTP/1.1 200 OK
    {
    "code": 200,
    "msg": null,
    "data": ""
    }
     */
    @RequestMapping("/reportStamp")
    @TokenAuth
    public ServerResponse reportStamp(TStampInfoVo tStampInfoVo) {
        logger.info("enter controller deleteStamp, parm tStampInfoVo:{}", tStampInfoVo);
        ServerResponse response = new ServerResponse();

        try {
            ParamHandlerManager.getHeadHandle().handleMessage("id", tStampInfoVo.getId(), ValidationEnum.BLANK);

            response.setCode(200);
//            response.setData(stampService.deleteStamp(tStampInfoVo.getId()));
        }catch (BusinessException e) {
            response.setCode(ServerResponse.ERROR_BBUSINESS);
            response.setMsg("举报in迹失败！");
        }

        return response;
    }

}
